QuadList class¶
Attributes: [DefaultMember("Item")] [DebuggerDisplay("QuadList: {Count}")]
Defined in
Namespace: ReactiveList.Reactive.Collections Assembly: ReactiveList.Reactive.dll Full name: ReactiveList.Reactive.Collections.QuadList<T> Modifiers: public sealed
Summary¶
View source (opens in a new tab)
Provides a high-performance, pooled list for storing elements with fast add, remove, and enumeration operations.
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
Class hierarchy
classDiagram
class QuadList~T~
class IQuad~T~ {
<>
}
IQuad~T~ <|.. QuadList~T~
class IEnumerable~T~ {
<>
}
IEnumerable~T~ <|.. QuadList~T~
class IEnumerable {
<>
}
IEnumerable <|.. QuadList~T~
class IDisposable {
<>
}
IDisposable <|.. QuadList~T~
Implements: IQuad
Remarks¶
QuadList is an internal shard optimized for scenarios where frequent additions and removals are required.
It uses array pooling to minimize allocations. The list is not thread-safe and should not
be accessed concurrently from multiple threads. Call Dispose to return internal arrays to the pool.
Change notifications are NOT emitted from this class - the parent QuaternaryList handles all notifications
through its Stream pipeline.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the QuadList class. |
Properties¶
| Name | Summary |
|---|---|
| Count | Gets the number of elements contained in the list. |
| this[] | Gets or sets the element at the specified index. |
Methods¶
| Name | Summary |
|---|---|
| Add | Adds an element to the end of the list. |
| Remove | Removes the first occurrence of a specific element from the list. |
| RemoveAt | Removes the element at the specified index. |
| IndexOf | Returns the zero-based index of the first occurrence of a value in the list. |
| Contains | Determines whether an element is in the list. |
| AddRange | Adds the elements of the specified span to the end of the list. |
| Clear | Removes all elements from the list. |
| EnsureCapacity | Ensures that the capacity of this list is at least the specified value. |
| AsSpan | Gets a span over the elements in the list. |
| CopyTo | Copies the elements of the list to an array starting at a particular array index. |
| GetEnumerator | Returns an enumerator that iterates through the list. |
| Dispose | Returns the internal array to the pool and releases resources. |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)